<#include "../public/header.html"/>
<div class="panel admin-panel">
	<div class="panel-head">
		<strong>查看配置</strong>
	</div>
	<div class="padding border-bottom">

		<form method="post" class="form-inline">
			<div class="form-group">
				<div class="label">
					<label for="env">选择环境</label>
				</div>
				<div class="field">
					<select class="input" name="env" dataType="Require">
					    <option value="">请选择环境..</option>
					    <#if envs??>
				        <#list envs as env><option <#if env?? && env == curenv>selected</#if> value="${env}">${env}</option></#list>
			            </#if>
					</select>
				</div>
			</div>

			<div class="form-group">
				<div class="label">
					<label>选择应用</label>
				</div>
				<div class="field">
					<select class="input" name="app" dataType="Require"> 
					  <option value="">请选择应用..</option>
					  <#if apps??> <#list apps as a>
					  <option <#if app?? && app == a.name>selected</#if> value="${a.name}">${a.name}</option> 
					  </#list> </#if>
					</select>
				</div>
			</div>

			<div class="form-group">
				<div class="label">
					<label>选择版本</label>
				</div>
				<div class="field">
					<select class="input" name="ver">
						<option selected="selected" value="0.0.0">0.0.0</option>
					</select>
				</div>
			</div>

			<div class="form-button">
				<input type="submit" class="button bg-sub" value="查询" />
			</div>
		</form>

	</div>
	<table class="table table-hover">
		<tr>
			<th width="160">应用名</th>
			<th width="60">环境</th>
			<th width="70">版本</th>
			<th width="200">内容</th>
			<th width="150">更新时间</th>
			<th width="100">更新人</th>
			<th width="*">操作</th>
		</tr>
		<#if configs??> <#list configs as conf>
		<tr>
			<td>${conf.appName}</td>
			<td>${conf.env}</td>
			<td>${conf.version!}</td>
			<td>${conf.name} &nbsp;
			 <span class="tips button button-little border-blue" data-toggle="click" data-place="bottom" data-target="#content${conf.id?c}">查看</span>
			 <div id="content${conf.id?c}" style="display:none;"><textarea  class="input" name="notify_emails" rows="8" cols="70">${conf.contents}</textarea></div>
			</td>
			<td></td>
			<td></td>
			<td>
			    <a class="button border-blue button-little" href="../edit/${conf.id?c}">编辑</a> 
				<a class="button border-blue button-little" href="../edit/${conf.id?c}">删除</a>
			</td>
		</tr>
		</#list> </#if>

	</table>
</div>
<#include "../public/footer.html"/>
